const { useState } = React;
const { Button, Flex, Rate } = antd;
const { DatePicker } = antd;

// 函数组件，无状态组件
function MyApp() {
  const handleChange = (value) => {
    console.log(`您选择的日期是: ${value ? value.format('YYYY年MM月DD日') : '未选择'}`);
  };

  return (
    <div>
      <DatePicker onChange={handleChange} />
      <Button type="primary">Primary Button</Button>
    </div>
  );
}

const container = document.getElementById("root");
const root = ReactDOM.createRoot(container);
root.render(<MyApp />);